package ch.zhaw.cctd.logic.network;

/**
 * Wird von der Networking-Klasse geworfen um in der Regel eine RemoteException zu kapseln
 * @author Benjamin Felder
 */
public class NetworkException extends Exception {
	
	private static final long serialVersionUID = 7464542870706356106L;

	public NetworkException(Exception parent) {
		this(null, parent, false);
	}
	
	public NetworkException(String message, Exception parent) {
		this(message, parent, false);
	}
	
	public NetworkException(String message, Exception parent, boolean connectionFatal) {
		super(message, parent);
		this.fatal = connectionFatal;
	}
	
	private final boolean fatal;
	
	public boolean isFatalError() {
		return this.fatal;
	}
	
}
